package com.windgo.controller.admin;

import com.windgo.bean.MarketDashboard;
import com.windgo.bean.common.BaseRespVo;
import com.windgo.service.DashBoardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 张林浩
 * @since 2022/10/12 09:05
 */
@RestController
@RequestMapping("admin")
public class DashBoardController {
    @Autowired
    DashBoardService dashBoardService;

    @RequestMapping("dashboard")
    public BaseRespVo dashboard(){
        MarketDashboard marketDashboard = dashBoardService.queryAllAmounts();
        return BaseRespVo.ok(marketDashboard);
    }
}